<template>
	<view v-if="isUp">
		<view class="mobile-bg" v-if="isShow" @click="close"></view>
		<view class="mobile-mask animated" :class="{slideInUp:isUp}" :style="{position:isPos?'fixed':'static'}">
			<view class="" style="display: grid;justify-content: center;margin-top: 30rpx;">
				<view style="display: flex;align-items: center;justify-content: center;">
					<view class="oneday">
						<span style="font-weight: 600;font-size: 40rpx;margin-right: 10rpx;">1</span>
						<span>天</span>
					</view>
					<image src="../../../static/images/appH5/xiangshang.png" style="width: 60rpx;margin: 0 20rpx;"
						mode="widthFix">
					</image>
					<view class="sevenday">
						<span style="font-weight: 700;font-size: 50rpx;margin-right: 10rpx;">7</span>
						<span>天</span>
					</view>
				</view>
				<view style="font-size: 24rpx;text-align: center;font-weight: 500;margin-top: 20rpx;color: #9D9D9D;">
					领取成功</view>
				<view style="font-size: 32rpx;text-align: center;font-weight: 500;margin-top: 20rpx;color: #3D3D3D;">
					邀请好友助力 观看权益延长至7天
				</view>
			</view>
			<view style="display: flex;justify-content: space-between;">
				<view class="cancel_btn" @click="toLook()">
					去观看
				</view>
				<view class="sub_btn" @click="toWechat()">
					去微信邀请助力
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	const app = getApp();
	import {
		mapGetters
	} from "vuex";

	export default {
		name: 'get_free_success',
		computed: mapGetters(['userInfo', 'isLogin']),
		props: {
			isUp: {
				type: Boolean,
				default: false,
			},
			authKey: {
				type: String,
				default: '',
			},
			isShow: {
				type: Boolean,
				default: true
			},
			isPos: {
				type: Boolean,
				default: true
			},
			appleShow: {
				type: String,
				default: ''
			},
			platform: {
				type: String,
				default: '',
			}
		},
		data() {
			return {
				userId: '',
				token: '',
				topImg: '../../../static/images/appH5/xiangshang.png',
			}
		},
		mounted() {

		},
		onLoad() {

		},
		methods: {
			close() {
				let that = this;
				that.$emit('closeSuccessPop', '');
			},
			toLook() {
				let that = this;
				that.$emit('closeSuccessPop', '');
			},
			toWechat() {
				let that = this;
				that.$emit('freeSuccessWithData', '');
			},
		}
	}
</script>

<style lang="stylus" scoped>
	.oneday {
		width: 100rpx;
		height: 100rpx;
		border-radius: 10rpx;
		background: #FFA67C;
		color: white;
		text-align: center;
		line-height: 100rpx;
	}

	.sevenday {
		width: 100rpx;
		height: 100rpx;
		border-radius: 10rpx;
		background: #FF694A;
		color: white;
		text-align: center;
		line-height: 100rpx;
	}

	.mobile-bg {
		position: fixed;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.5);
		z-index: 2001
	}

	.isPos {
		position: static;
	}

	.mobile-mask {
		z-index: 2002;
		// position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		padding: 30rpx 30rpx 67rpx 30rpx;
		background: #fff;

		.input-item {}

		.cancel_btn {
			width: 320rpx;
			height: 66rpx;
			line-height: 66rpx;
			margin-top: 60rpx;
			background: #F5F7FA;
			border-radius: 43rpx;
			color: #848D9D;
			font-size: 28rpx;
			text-align: center;
		}

		.sub_btn {
			width: 320rpx;
			height: 66rpx;
			line-height: 66rpx;
			margin-top: 60rpx;
			background: #FF694A;
			border-radius: 43rpx;
			color: #fff;
			font-size: 28rpx;
			text-align: center;
		}
	}

	.animated {
		animation-duration: .4s
	}
</style>